﻿@model HanGu.Entity.Message
@{
    Layout = null;
    var action = Request["action"];
    var read = action != null && action == "read";
    var Parents = ViewData["Parents"] as SelectList;

}
<div class="pageContent">
    <form method="post" action="Users/Default/MoveMember?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
    onsubmit="return validateCallback(this, dialogAjaxDone)">
    @Html.ValidationSummary(true)
    <div class="pageFormContent" layouth="56">
        @Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model => model.Type)
        @Html.HiddenFor(model => model.Title)
        @Html.HiddenFor(model => model.GUID)
        @Html.Hidden("navID", "CustomerInfoDefault")
        @Html.Hidden("moveMembers", Request["membersID"])
        <div>
            <label>
                目标用户：</label>
            @foreach (var item in Parents)
            {

                <label style="width: auto; white-space: nowrap">
                    <input name="AssignedIns" class="checkbox required" id="AssignedIns" style="magin-left: 5px;" type="checkbox" value="@item.Value"/>
                    @item.Text
                </label>

            }
        </div>
        <div class="divider">
        </div>
        <p style="width: 100%">
            <label>
                须转移客户：</label>
            @HttpUtility.UrlDecode(Request["membersName"], System.Text.Encoding.GetEncoding("UTF-8"))
            @if (Request["membersID"] == null || string.IsNullOrEmpty(Request["membersID"]))
            { 
                <span style="color: Red">请先选择客户（勾选复选框）</span>
            }
        </p>
    </div>
    @if (Request["action"] != "view")
    {
        <div class="formBar">
            <ul>
                @if (!read)
                {
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">
                                    提交</button></div>
                        </div>
                    </li>
                }
                <li>
                    <div class="button">
                        <div class="buttonContent">
                            <button type="button" class="close">
                                取消</button></div>
                    </div>
                </li>
            </ul>
        </div>
    }
    </form>
</div>
